<h1>Editing post</h1>

<% form_for(@post) do |f| %>
  <%= f.error_messages %>

  <p>
    <%= f.label :title %><br />
    <%= f.text_field :title %>
  </p>

  <p>
    <%= f.label :body %><br />
    <%= f.text_area :body %>
  </p>

  <p>
    <%= f.submit 'Update' %>
  </p>
<% end %>

<%= link_to 'Show', @post %> |
<%= link_to 'Back', posts_path %> |
<%= link_to 'Destroy', @post, :confirm => 'Are you sure?', :method => :delete %>

<% for comment in @comments do %>
	<%= comment.name %><br /><br />
	<%= comment.body %><br />
	<%= button_to 'DELETE', :action => 'remove_comment', :id => comment.id%>
--------------------------------------------<br />
<% end %>